﻿@page "/dataconfigs/index"
@attribute [Authorize]


<CascadingValue Value="this" IsFixed="true">
    <DynamicComponent Type="_dynamicComponentType"></DynamicComponent>
</CascadingValue>

@code
{
    private Type _dynamicComponentType = typeof(DataConfigTable);
    private string? _dataConfigCode;

    public void SetDynamicComponentType(Type type)
    {
        _dynamicComponentType = type;
        StateHasChanged();
    }

    public void SetDataConfigCode(string configCode)
    {
        _dataConfigCode = configCode;
    }

    public string? GetDataConfigCode()
    {
        return _dataConfigCode;
    }
}